package io;

import java.io.*;

public class PrintWriterDemo {
    public static void main(String[] args) throws FileNotFoundException {
        FileOutputStream fos = new FileOutputStream("pw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos);
        BufferedWriter bw = new BufferedWriter(osw);
        PrintWriter pw = new PrintWriter(bw);
        pw.println("天青色等烟雨，");
        pw.println("而我在等你。");
        pw.println("炊烟袅袅升起");
        System.out.println("写出完毕");
        pw.close();

    }
}
